import 'package:safetymonitor/generated/json/base/json_convert_content.dart';
import 'package:safetymonitor/app/data/entities/home/duty/change_shift_info_create_entity.dart';

ChangeShiftInfoCreateEntity $ChangeShiftInfoCreateEntityFromJson(Map<String, dynamic> json) {
  final ChangeShiftInfoCreateEntity changeShiftInfoCreateEntity = ChangeShiftInfoCreateEntity();
  final String? handoverPersonDept = jsonConvert.convert<String>(json['handoverPersonDept']);
  if (handoverPersonDept != null) {
    changeShiftInfoCreateEntity.handoverPersonDept = handoverPersonDept;
  }
  final String? handoverScheduleName = jsonConvert.convert<String>(json['handoverScheduleName']);
  if (handoverScheduleName != null) {
    changeShiftInfoCreateEntity.handoverScheduleName = handoverScheduleName;
  }
  final int? handoverScheduleConfigId = jsonConvert.convert<int>(json['handoverScheduleConfigId']);
  if (handoverScheduleConfigId != null) {
    changeShiftInfoCreateEntity.handoverScheduleConfigId = handoverScheduleConfigId;
  }
  final String? handoverLeaderPhone = jsonConvert.convert<String>(json['handoverLeaderPhone']);
  if (handoverLeaderPhone != null) {
    changeShiftInfoCreateEntity.handoverLeaderPhone = handoverLeaderPhone;
  }
  final String? handoverLeader = jsonConvert.convert<String>(json['handoverLeader']);
  if (handoverLeader != null) {
    changeShiftInfoCreateEntity.handoverLeader = handoverLeader;
  }
  final int? handoverLeaderId = jsonConvert.convert<int>(json['handoverLeaderId']);
  if (handoverLeaderId != null) {
    changeShiftInfoCreateEntity.handoverLeaderId = handoverLeaderId;
  }
  final String? handoverPerson = jsonConvert.convert<String>(json['handoverPerson']);
  if (handoverPerson != null) {
    changeShiftInfoCreateEntity.handoverPerson = handoverPerson;
  }
  final String? handoverPersonPhone = jsonConvert.convert<String>(json['handoverPersonPhone']);
  if (handoverPersonPhone != null) {
    changeShiftInfoCreateEntity.handoverPersonPhone = handoverPersonPhone;
  }
  final int? scheduleInfoId = jsonConvert.convert<int>(json['scheduleInfoId']);
  if (scheduleInfoId != null) {
    changeShiftInfoCreateEntity.scheduleInfoId = scheduleInfoId;
  }
  final int? takeoverScheduleConfigId = jsonConvert.convert<int>(json['takeoverScheduleConfigId']);
  if (takeoverScheduleConfigId != null) {
    changeShiftInfoCreateEntity.takeoverScheduleConfigId = takeoverScheduleConfigId;
  }
  final String? takeoverScheduleName = jsonConvert.convert<String>(json['takeoverScheduleName']);
  if (takeoverScheduleName != null) {
    changeShiftInfoCreateEntity.takeoverScheduleName = takeoverScheduleName;
  }
  final String? takeoverTime = jsonConvert.convert<String>(json['takeoverTime']);
  if (takeoverTime != null) {
    changeShiftInfoCreateEntity.takeoverTime = takeoverTime;
  }
  final int? takeoverPersonId = jsonConvert.convert<int>(json['takeoverPersonId']);
  if (takeoverPersonId != null) {
    changeShiftInfoCreateEntity.takeoverPersonId = takeoverPersonId;
  }
  final String? takeoverPersonPhone = jsonConvert.convert<String>(json['takeoverPersonPhone']);
  if (takeoverPersonPhone != null) {
    changeShiftInfoCreateEntity.takeoverPersonPhone = takeoverPersonPhone;
  }
  final String? takeoverPerson = jsonConvert.convert<String>(json['takeoverPerson']);
  if (takeoverPerson != null) {
    changeShiftInfoCreateEntity.takeoverPerson = takeoverPerson;
  }
  final String? takeoverPersonDept = jsonConvert.convert<String>(json['takeoverPersonDept']);
  if (takeoverPersonDept != null) {
    changeShiftInfoCreateEntity.takeoverPersonDept = takeoverPersonDept;
  }
  final int? takeoverLeaderId = jsonConvert.convert<int>(json['takeoverLeaderId']);
  if (takeoverLeaderId != null) {
    changeShiftInfoCreateEntity.takeoverLeaderId = takeoverLeaderId;
  }
  final String? takeoverLeaderPhone = jsonConvert.convert<String>(json['takeoverLeaderPhone']);
  if (takeoverLeaderPhone != null) {
    changeShiftInfoCreateEntity.takeoverLeaderPhone = takeoverLeaderPhone;
  }
  final String? takeoverLeader = jsonConvert.convert<String>(json['takeoverLeader']);
  if (takeoverLeader != null) {
    changeShiftInfoCreateEntity.takeoverLeader = takeoverLeader;
  }
  final String? onDutyTime = jsonConvert.convert<String>(json['onDutyTime']);
  if (onDutyTime != null) {
    changeShiftInfoCreateEntity.onDutyTime = onDutyTime;
  }
  final String? handoverTime = jsonConvert.convert<String>(json['handoverTime']);
  if (handoverTime != null) {
    changeShiftInfoCreateEntity.handoverTime = handoverTime;
  }
  final String? eventTime = jsonConvert.convert<String>(json['eventTime']);
  if (eventTime != null) {
    changeShiftInfoCreateEntity.eventTime = eventTime;
  }
  final String? eventAddr = jsonConvert.convert<String>(json['eventAddr']);
  if (eventAddr != null) {
    changeShiftInfoCreateEntity.eventAddr = eventAddr;
  }
  final String? eventDesc = jsonConvert.convert<String>(json['eventDesc']);
  if (eventDesc != null) {
    changeShiftInfoCreateEntity.eventDesc = eventDesc;
  }
  final String? eventReason = jsonConvert.convert<String>(json['eventReason']);
  if (eventReason != null) {
    changeShiftInfoCreateEntity.eventReason = eventReason;
  }
  final String? measure = jsonConvert.convert<String>(json['measure']);
  if (measure != null) {
    changeShiftInfoCreateEntity.measure = measure;
  }
  final String? remark = jsonConvert.convert<String>(json['remark']);
  if (remark != null) {
    changeShiftInfoCreateEntity.remark = remark;
  }
  final int? majorEventInfoId = jsonConvert.convert<int>(json['majorEventInfoId']);
  if (majorEventInfoId != null) {
    changeShiftInfoCreateEntity.majorEventInfoId = majorEventInfoId;
  }
  return changeShiftInfoCreateEntity;
}

Map<String, dynamic> $ChangeShiftInfoCreateEntityToJson(ChangeShiftInfoCreateEntity entity) {
  final Map<String, dynamic> data = <String, dynamic>{};
  data['handoverPersonDept'] = entity.handoverPersonDept;
  data['handoverScheduleName'] = entity.handoverScheduleName;
  data['handoverScheduleConfigId'] = entity.handoverScheduleConfigId;
  data['handoverLeaderPhone'] = entity.handoverLeaderPhone;
  data['handoverLeader'] = entity.handoverLeader;
  data['handoverLeaderId'] = entity.handoverLeaderId;
  data['handoverPerson'] = entity.handoverPerson;
  data['handoverPersonPhone'] = entity.handoverPersonPhone;
  data['scheduleInfoId'] = entity.scheduleInfoId;
  data['takeoverScheduleConfigId'] = entity.takeoverScheduleConfigId;
  data['takeoverScheduleName'] = entity.takeoverScheduleName;
  data['takeoverTime'] = entity.takeoverTime;
  data['takeoverPersonId'] = entity.takeoverPersonId;
  data['takeoverPersonPhone'] = entity.takeoverPersonPhone;
  data['takeoverPerson'] = entity.takeoverPerson;
  data['takeoverPersonDept'] = entity.takeoverPersonDept;
  data['takeoverLeaderId'] = entity.takeoverLeaderId;
  data['takeoverLeaderPhone'] = entity.takeoverLeaderPhone;
  data['takeoverLeader'] = entity.takeoverLeader;
  data['onDutyTime'] = entity.onDutyTime;
  data['handoverTime'] = entity.handoverTime;
  data['eventTime'] = entity.eventTime;
  data['eventAddr'] = entity.eventAddr;
  data['eventDesc'] = entity.eventDesc;
  data['eventReason'] = entity.eventReason;
  data['measure'] = entity.measure;
  data['remark'] = entity.remark;
  data['majorEventInfoId'] = entity.majorEventInfoId;
  return data;
}

extension ChangeShiftInfoCreateEntityExtension on ChangeShiftInfoCreateEntity {
  ChangeShiftInfoCreateEntity copyWith({
    String? handoverPersonDept,
    String? handoverScheduleName,
    int? handoverScheduleConfigId,
    String? handoverLeaderPhone,
    String? handoverLeader,
    int? handoverLeaderId,
    String? handoverPerson,
    String? handoverPersonPhone,
    int? scheduleInfoId,
    int? takeoverScheduleConfigId,
    String? takeoverScheduleName,
    String? takeoverTime,
    int? takeoverPersonId,
    String? takeoverPersonPhone,
    String? takeoverPerson,
    String? takeoverPersonDept,
    int? takeoverLeaderId,
    String? takeoverLeaderPhone,
    String? takeoverLeader,
    String? onDutyTime,
    String? handoverTime,
    String? eventTime,
    String? eventAddr,
    String? eventDesc,
    String? eventReason,
    String? measure,
    String? remark,
    int? majorEventInfoId,
  }) {
    return ChangeShiftInfoCreateEntity()
      ..handoverPersonDept = handoverPersonDept ?? this.handoverPersonDept
      ..handoverScheduleName = handoverScheduleName ?? this.handoverScheduleName
      ..handoverScheduleConfigId = handoverScheduleConfigId ?? this.handoverScheduleConfigId
      ..handoverLeaderPhone = handoverLeaderPhone ?? this.handoverLeaderPhone
      ..handoverLeader = handoverLeader ?? this.handoverLeader
      ..handoverLeaderId = handoverLeaderId ?? this.handoverLeaderId
      ..handoverPerson = handoverPerson ?? this.handoverPerson
      ..handoverPersonPhone = handoverPersonPhone ?? this.handoverPersonPhone
      ..scheduleInfoId = scheduleInfoId ?? this.scheduleInfoId
      ..takeoverScheduleConfigId = takeoverScheduleConfigId ?? this.takeoverScheduleConfigId
      ..takeoverScheduleName = takeoverScheduleName ?? this.takeoverScheduleName
      ..takeoverTime = takeoverTime ?? this.takeoverTime
      ..takeoverPersonId = takeoverPersonId ?? this.takeoverPersonId
      ..takeoverPersonPhone = takeoverPersonPhone ?? this.takeoverPersonPhone
      ..takeoverPerson = takeoverPerson ?? this.takeoverPerson
      ..takeoverPersonDept = takeoverPersonDept ?? this.takeoverPersonDept
      ..takeoverLeaderId = takeoverLeaderId ?? this.takeoverLeaderId
      ..takeoverLeaderPhone = takeoverLeaderPhone ?? this.takeoverLeaderPhone
      ..takeoverLeader = takeoverLeader ?? this.takeoverLeader
      ..onDutyTime = onDutyTime ?? this.onDutyTime
      ..handoverTime = handoverTime ?? this.handoverTime
      ..eventTime = eventTime ?? this.eventTime
      ..eventAddr = eventAddr ?? this.eventAddr
      ..eventDesc = eventDesc ?? this.eventDesc
      ..eventReason = eventReason ?? this.eventReason
      ..measure = measure ?? this.measure
      ..remark = remark ?? this.remark
      ..majorEventInfoId = majorEventInfoId ?? this.majorEventInfoId;
  }
}